<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>咕咕牛网络测速</title>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC&family=Orbitron:wght@400;500;700&family=Rajdhani:wght@500;700&display=swap" rel="stylesheet">
	<style>
		:root {
			--bg-color: #212428;
			--container-bg: #212428;
			--item-bg-card: #2d3039;
			--text-primary: #ffffff;
			--text-secondary: #a7a9ad;
			--text-muted: #7f8185;
			--header-title-color: #ffffff;
			--header-subtitle-color: #a7a9ad;
			--header-underline-color: #43d8b8;
			--success-color: #3cb371;
			--warning-color: #e6c35c;
			--fail-color: #d9585b;
			--na-color: #80848e;
			--best-choice-bg: #e6c35c;
			--best-choice-text: #2d3039;
			--container-border: rgba(67, 216, 184, 0.2);
			--accent-color: var(--header-underline-color);
			--glow-color: transparent;
			--soft-shadow: none;
			--header-bg: var(--container-bg);
			--header-border-line: rgba(255, 255, 255, 0.1);
			--item-border-card: transparent;
			--item-shadow-card: none;
			--accent-glow: rgba(67, 216, 184, 0.1);
			--panel-backdrop-blur: 0px;
		}
				
		* {
			box-sizing: border-box;
		}
		
		html,
		body {
			margin: 0;
			padding: 0;
		}
		
		body {
			font-family: 'Noto Sans SC', sans-serif;
			background-color: var(--bg-color);
			color: var(--text-primary);
			padding: 10px;
			font-size: 14px;
			line-height: 1.6;
			width: 840px;
			margin: 20px auto;
			position: relative;
			z-index: 0;
			overflow-x: hidden;
			-webkit-font-smoothing: antialiased;
			-moz-osx-font-smoothing: grayscale;
		}
		
		.background-layer {
			display: none;
		}
		
		.container-shadow-wrapper {
			position: relative;
			z-index: 2;
			filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
			padding: 0;
			box-sizing: border-box;
			border-radius: 16px;
			width: 100%;
			margin: 0 auto;
		}
		
		.container {
			background-color: var(--container-bg);
			border-radius: 16px;
			border: 1px solid var(--container-border);
			width: 100%;
			margin: 0 auto;
			box-shadow: 0 0 15px 15px var(--accent-glow);
			padding: 0;
			box-sizing: border-box;
			z-index: 1;
			overflow: hidden;
			backdrop-filter: none;
			-webkit-backdrop-filter: none;
			background-image: repeating-linear-gradient(45deg, rgba(167, 169, 173, 0.05) 0, rgba(167, 169, 173, 0.05) 1px, transparent 1px, transparent 20px);
			background-size: 20px 20px;
		}
		
		.container::before,
		.container::after,
		body::before,
		body::after {
			display: none;
		}
		
		.header {
			text-align: left;
			margin-bottom: 20px;
			padding: 25px 30px 15px 30px;
			background-color: var(--header-bg);
			position: relative;
			z-index: 1;
			border-top-left-radius: 16px;
			border-top-right-radius: 16px;
			display: flex;
			justify-content: space-between;
			align-items: center;
			box-shadow: inset 0 -1px 0 var(--header-border-line);
		}
		
		.header h1 {
			font-family: 'Noto Sans SC', sans-serif;
			font-weight: 700;
			font-size: 26px;
			color: var(--header-title-color);
			margin: 0;
			letter-spacing: 0.5px;
			position: relative;
			display: flex;
			align-items: baseline;
			padding-bottom: 4px;
		}
		
		.header h1 span {
			font-family: 'Orbitron', monospace;
			color: var(--header-subtitle-color);
			font-size: 16px;
			margin-left: 10px;
			font-weight: 500;
			letter-spacing: 0.25px;
		}
		
		.header h1::after {
			content: '';
			position: absolute;
			left: 0;
			bottom: 0;
			width: 40%;
			height: 3px;
			background-color: var(--header-underline-color);
			border-radius: 1px;
			box-shadow: 0 0 4px var(--header-underline-color);
		}
		
		.header-image-container {
			width: 50px;
			height: 50px;
			overflow: hidden;
			flex-shrink: 0;
			margin-left: 20px;
			display: flex;
			justify-content: center;
			align-items: center;
		}
		
		.header-cute-image {
			width: 100%;
			height: 100%;
			object-fit: cover;
			display: block;
		}
		
		.category-title {
			font-family: 'Noto Sans SC', sans-serif;
			font-size: 18px;
			font-weight: 700;
			color: var(--text-primary);
			text-align: left;
			margin: 20px 0 10px 0;
			padding-left: 10px;
			border-left: 4px solid var(--header-underline-color);
			letter-spacing: 0.5px;
		}
		
		.speedtest-section {
			padding: 0 25px;
		}
		
		.speed-cards-list {
			display: grid;
			grid-template-columns: repeat(3, 1fr);
			gap: 15px;
			margin-bottom: 18px;
		}
		
		.speedtest-category:last-of-type .speed-cards-list {
			margin-bottom: 0;
		}
		
		.speed-card {
			background-color: var(--item-bg-card);
			border-radius: 8px;
			padding: 15px 20px;
			border: 1px solid var(--item-border-card);
			box-shadow: 0 2px 8px var(--item-shadow-card);
			position: relative;
			overflow: hidden;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			align-items: flex-start;
			min-height: 90px;
			transition: all 0.2s ease-in-out;
			padding-left: 20px;
		}
		
		.speed-card::before {
			content: '';
			position: absolute;
			top: 0;
			left: 0;
			width: 5px;
			height: 100%;
			background-color: var(--default-color);
			border-radius: 8px 0 0 8px;
			z-index: 0;
		}
		
		.speed-card.best-node-glow {
			border: none;
			transform: none;
		}
		
		.speed-card.bar-green::before {
			background-color: var(--success-color);
		}
		
		.speed-card.bar-yellow::before {
			background-color: var(--warning-color);
		}
		
		.speed-card.bar-orange::before {
			background-color: var(--fail-color);
		}
		
		.speed-card.bar-gray::before {
			background-color: var(--na-color);
		}
		
		.speed-card.bar-red::before {
			background-color: var(--fail-color);
		}
		
		.speed-card-content {
			position: relative;
			z-index: 1;
			width: 100%;
		}
		
		.card-initial {
			position: absolute;
			top: 35%;
			right: 25px;
			transform: translateY(-50%);
			font-family: 'Orbitron', 'Rajdhani', Arial, sans-serif;
			font-size: 54px;
			font-weight: 700;
			color: rgba(255, 255, 255, 0.05);
			opacity: 1;
			pointer-events: none;
			user-select: none;
			letter-spacing: 2px;
			z-index: 1;
			-webkit-mask-image: linear-gradient(to left, transparent 0%, #000 40%, #000 100%);
			mask-image: linear-gradient(to left, transparent 0%, #000 40%, #000 100%);
		}
		
		.node-id {
			font-family: 'Rajdhani', monospace;
			font-size: 11px;
			color: var(--text-muted);
			margin-bottom: 5px;
			letter-spacing: 0.5px;
		}
		
		.node-name {
			font-family: 'Noto Sans SC', sans-serif;
			font-size: 16px;
			font-weight: bold;
			color: var(--text-primary);
			line-height: 1.2;
			margin-bottom: 8px;
		}
		
		.status-info {
			display: flex;
			justify-content: space-between;
			align-items: center;
			width: 100%;
			font-size: 13px;
		}
		
		.latency-status {
			font-weight: bold;
			padding: 3px 10px;
			border-radius: 16px;
			text-align: center;
			color: white;
		}
		
		.latency-status.status-ok,
		.latency-status.latency-green {
			background-color: var(--success-color);
		}
		
		.latency-status.status-timeout {
			background-color: var(--fail-color);
		}
		
		.latency-status.status-na {
			background-color: var(--na-color);
		}
		
		.latency-status.latency-yellow {
			background-color: var(--warning-color);
		}
		
		.latency-status.latency-orange {
			background-color: var(--warning-color);
		}
		
		.priority-label {
			color: var(--text-secondary);
			font-size: 12px;
			margin-left: 10px;
		}
		
		.priority-value {
			font-family: 'Orbitron', monospace;
			font-weight: 500;
			color: var(--text-secondary);
		}
		
		.best-choice {
			margin-top: 20px;
			padding: 12px 15px;
			border-radius: 8px;
			background: var(--best-choice-bg);
			border: none;
			box-shadow: none;
			text-align: center;
			font-size: 16px;
			font-weight: bold;
			color: var(--best-choice-text);
			display: flex;
			align-items: center;
			justify-content: center;
			font-family: 'Noto Sans SC', sans-serif;
		}
		
		.best-choice .icon {
			margin-right: 8px;
			font-size: 18px;
			color: var(--best-choice-text);
		}
		
		.best-choice .duration-text {
			font-family: 'Orbitron', monospace;
			font-size: 13px;
			color: var(--best-choice-text);
			opacity: 0.8;
			margin-left: 0;
		}
		
		.best-choice .separator {
			margin: 0 10px;
			opacity: 0.7;
		}
		
		.gitclone-grid {
			align-items: stretch;
		}
		
		.info-tip {
			background-color: rgba(67, 216, 184, 0.1);
			border: 1px solid var(--header-underline-color);
			border-radius: 8px;
			padding: 15px;
			display: flex;
			flex-direction: column;
			justify-content: center;
		}
		
		.tip-title {
			font-weight: bold;
			color: var(--header-underline-color);
			font-size: 14px;
			margin-bottom: 8px;
			display: flex;
			align-items: center;
		}
		
		.tip-text {
			font-size: 13px;
			color: var(--text-secondary);
			line-height: 1.5;
			margin: 0;
		}
		
		.footer {
			text-align: center;
			padding: 15px 0px 15px 0px;
			font-size: 14px;
			color: var(--text-secondary);
			letter-spacing: 0.25px;
			font-family: 'Orbitron', sans-serif;
			font-weight: 500;
			position: relative;
			z-index: 1;
		}
	</style>
</head>

<body style="{{scaleStyleValue}}">
	<div class="background-layer"></div>
	<div class="container-shadow-wrapper">
		<div class="container">
			<header class="header">
				<h1>咕咕牛的网络测速<span>/ISPEEDI/</span></h1>
				<div class="header-image-container">
					{{ if headerImage }}
					<img src="{{ headerImage }}" class="header-cute-image"> {{ /if }}
				</div>
			</header>

			<main class="speedtest-section">
				{{ if speeds.priority1 && speeds.priority1.length > 0 }}
				<div class="speedtest-category">
					<h2 class="category-title">热门镜像 (优选节点)</h2>
					<div class="speed-cards-list">
						{{ each speeds.priority1 s }}
						<div class="speed-card {{ s.statusClass }} {{ s.barColorClass }} {{ if s.isBest }}best-node-glow{{/if}}">
							<div class="node-id">[NODE-{{ s.id }}]</div>
							<div class="node-name">{{ s.name }}</div>
							<div class="status-info">
								<div class="card-initial">{{ s.name.charAt(0).toUpperCase() }}</div>
								<span class="latency-status {{ s.statusClass }} {{ s.latencyColorClass }}">{{
                                    s.statusText }}</span>
								<span class="priority-label">优先级: <span class="priority-value">{{ s.priority ?? 'N/A'
                                        }}</span></span>
							</div>
						</div>
						{{ /each }}
					</div>
				</div>
				{{ /if }} {{ if speeds.priority2 && speeds.priority2.length > 0 }}
				<div class="speedtest-category">
					<h2 class="category-title">官方镜像 (GitHub & 镜像)</h2>
					<div class="speed-cards-list">
						{{ each speeds.priority2 s }}
						<div class="speed-card {{ s.statusClass }} {{ s.barColorClass }} {{ if s.isBest }}best-node-glow{{/if}}">
							<div class="node-id">[NODE-{{ s.id }}]</div>
							<div class="node-name">{{ s.name }}</div>
							<div class="status-info">
								<div class="card-initial">{{ s.name.charAt(0).toUpperCase() }}</div>
								<span class="latency-status {{ s.statusClass }} {{ s.latencyColorClass }}">{{
                                    s.statusText }}</span>
								<span class="priority-label">优先级: <span class="priority-value">{{ s.priority ?? 'N/A'
                                        }}</span></span>
							</div>
						</div>
						{{ /each }}
					</div>
				</div>
				{{ /if }} {{ if speeds.priority3 && speeds.priority3.length > 0 }}
				<div class="speedtest-category">
					<h2 class="category-title">无法测速 (Git Clone)</h2>
					<div class="speed-cards-list gitclone-grid">
						{{ each speeds.priority3 s }}
						<div class="speed-card {{ s.statusClass }} {{ s.barColorClass }}">
							<div class="node-id">[NODE-{{ s.id }}]</div>
							<div class="node-name">{{ s.name }}</div>
							<div class="status-info">
								<div class="card-initial">{{ s.name.charAt(0).toUpperCase() }}</div>
								<span class="latency-status {{ s.statusClass }} {{ s.latencyColorClass }}">{{
                                    s.statusText }}</span>
								<span class="priority-label">优先级: <span class="priority-value">{{ s.priority ?? 'N/A'
                                        }}</span></span>
							</div>
						</div>
						{{ /each }}

						<div class="info-tip">
							<div class="tip-title">💡 TIP</div>
							<p class="tip-text"> 网络测速结果仅供参考，实际下载节点以后续为准。</p>
						</div>
					</div>
				</div>
				{{ /if }}

				<div class="best-choice">
					<span class="icon">🍀</span> 优先选择节点:{{ best1Display }}
					<span class="separator">|</span>
					<span class="duration-text">耗时: {{ duration }}s</span>
				</div>
			</main>

			<footer class="footer">Miao-Plugin-MBT v{{ pluginVersion }}</footer>
		</div>
	</div>
</body>

</html>